<?php session_start();

if (!isset($_SESSION["txt_login"]))
{ print "<script type = 'text/javascript'> location.href = 'index.php'</script>"; exit();}

include "../conexao.php";
$id_banner   = $_GET["id_banner"];
$acao       = $_GET["acao"];

$maximo     = $_GET["maximo"];
$pagina     = $_GET["pagina"];
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="estilo_admin.css" rel="stylesheet" type="text/css" />
<title>Untitled Document</title>
</head>

<body><?php 
$sql = mysql_query("SELECT * FROM banner WHERE id_banner='$id_banner'");
$linha=mysql_fetch_array($sql);

?>
<table width="100%" border="0">
  <tr>
    <td><form action="op_lstpublicidadeadmin.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
      <table width="100%" border="0">
        <tr>
          <td width="10%"  class="meio"><strong>T&iacute;tulo</strong></td>
          <td colspan="2"  class="meio"><label>
            <input name="titulo" type="text" id="titulo" value="<?php echo $linha["titulo"]; ?>" size="80" />
          </label></td>
          <td width="13%">&nbsp;</td>
        </tr>
        <tr>
          <td  class="meio"><strong>Link</strong></td>
          <td colspan="2"  class="meio"><label>
            <input name="link" type="text" id="link" value="<?php if($linha["link"]==""){echo "http://";}else{echo $linha["link"];} ?>" size="80" />
          </label></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="meio"><div align="center"><strong>Foto</strong></div></td>
          <td width="27%" class="meio">
            <label>
            <input type="file" name="nome_arquivo" id="nome_arquivo" />
            </label></td>
          <td width="50%" class="meio"><div align="center"><img src="../banner/<?php echo $linha["foto"];?>" width="155" height="120"/></div></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td class="meio"><div align="center"><strong>Foto</strong>2</div></td>
          <td width="27%" class="meio">
            <label>
            <input type="file" name="nome_arquivo2" id="nome_arquivo2" />
            </label></td>
          <td width="50%" class="meio"><div align="center"><img src="../banner/<?php echo $linha["foto2"];?>" width="155" height="120"/></div></td>
          <td>&nbsp;</td>
        </tr> <tr>
          <td class="meio"><div align="center"><strong>Foto</strong>3</div></td>
          <td width="27%" class="meio">
            <label>
            <input type="file" name="nome_arquivo3" id="nome_arquivo3" />
            </label></td>
          <td width="50%" class="meio"><div align="center"><img src="../banner/<?php echo $linha["foto3"];?>" width="155" height="120"/></div></td>
          <td>&nbsp;</td>
        </tr> <tr>
          <td class="meio"><div align="center"><strong>Foto</strong>4</div></td>
          <td width="27%" class="meio">
            <label>
            <input type="file" name="nome_arquivo4" id="nome_arquivo4" />
            </label></td>
          <td width="50%" class="meio"><div align="center"><img src="../banner/<?php echo $linha["foto4"];?>" width="155" height="120"/></div></td>
          <td>&nbsp;</td>
        </tr> <tr>
          <td class="meio"><div align="center"><strong>Foto</strong>5</div></td>
          <td width="27%" class="meio">
            <label>
            <input type="file" name="nome_arquivo5" id="nome_arquivo5" />
            </label></td>
          <td width="50%" class="meio"><div align="center"><img src="../banner/<?php echo $linha["foto5"];?>" width="155" height="120"/></div></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td colspan="2"><label>
            <input type="submit" name="button" id="button" value="<?php echo $acao;?>" />
            <input name="acao" type="hidden" id="acao" value="<?php echo $acao?>" />
            <input name="id_banner" type="hidden" id="id_banner" value="<?php echo $linha["id_banner"];?>"/>
            <input name="pagina" type="hidden" id="pagina" value="<?php echo $pagina;?>" />
            <input name="maximo" type="hidden" id="maximo" value="<?php echo $maximo;?>" />
            <input name="foto" type="hidden" id="foto" value="<?php echo $linha["foto"];?>" />
            <input name="foto2" type="hidden" id="foto2" value="<?php echo $linha["foto2"];?>" />
            <input name="foto3" type="hidden" id="foto3" value="<?php echo $linha["foto3"];?>" />
            <input name="foto4" type="hidden" id="foto4" value="<?php echo $linha["foto4"];?>" />
            <input name="foto5" type="hidden" id="foto5" value="<?php echo $linha["foto5"];?>" />
          </label></td>
          <td>&nbsp;</td>
        </tr>
      </table>
        </form>
    </td>
  </tr>
</table>
</body>
</html>
